package de.haw.shc.Color;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.larswerkman.colorpicker.*;
import de.haw.shc.R;

/**
 * Created with IntelliJ IDEA.
 * User: mizus
 * Date: 12.06.13
 * Time: 14:51
 * To change this template use File | Settings | File Templates.
 */
public class ColorFragment extends Fragment
{

      private ColorPicker picker;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.color_act, container, false);

          picker = (ColorPicker) view.findViewById(R.id.picker);
          SVBar svBar = (SVBar) view.findViewById(R.id.svbar);
          OpacityBar opacityBar = (OpacityBar) view.findViewById(R.id.opacitybar);
          SaturationBar saturationBar = (SaturationBar) view.findViewById(R.id.saturationbar);
          ValueBar valueBar = (ValueBar) view.findViewById(R.id.valuebar);

          picker.addSVBar(svBar);
          picker.addOpacityBar(opacityBar);
          picker.addSaturationBar(saturationBar);
          picker.addValueBar(valueBar);
        return view;
      }



    public int getColor(){
        return picker.getColor();
    }



}
